package kaoshi;

public class Quest10 {
    public static void main(String[] args) {
        int[] nums = {1, 2, 3, 4, 5, 2, 1};
        System.out.println(duicheng(nums, 0, nums.length - 1));
    }

    public static boolean duicheng(int nums[], int start, int end) {
        if (start >= end)
            return true;
        if (nums[start] == nums[end])
            return duicheng(nums, start + 1, end - 1);
        else
            return false;
    }
}
